<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>在线考试系统</title>
    <link rel="shortcut icon" th:href="@{/static/favicon.ico}" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/style.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/ui.css}" />
</head>
<body>
<div class="tm_main">
    <div class="tm_container">
        <ul class="tm_breadcrumb">
            <li><a th:href="@{/common/welcome}">首页</a> <span class="divider">&gt;</span></li>
            <li class="active">修改密码</li>
        </ul>
    </div>
    <br/>
    <div class="tm_container">
        <form method="post" id="form_user_form" th:action="@{/common/password/update}">
            <table width="100%" cellpadding="5" border="0" class="tm_table_form">
                <tbody>
                <tr>
                    <th width="120">账户 : </th>
                    <td th:text="${account}"></td>
                </tr>
                <tr>
                    <th>新密码 : </th>
                    <td>
                        <input type="password" id="new_password"  name="new_password" class="tm_txt" size="50" maxlength="30" />
                        <span class="tm_required">*</span>
                    </td>
                </tr>
                <tr>
                    <th>确认新密码 : </th>
                    <td>
                        <input type="password" id="new_password2" class="tm_txt"  size="50" maxlength="30"/>
                        <span class="tm_required">*</span>
                    </td>
                </tr>
                </tbody>
                <tfoot>
                <tr>
                    <th></th>
                    <td>
                        <button class="tm_btn tm_btn_primary" type="button" onclick="tmProfile.doUpdate();">提交</button>
                    </td>
                </tr>
                </tfoot>
            </table>

        </form>

    </div>
</div>
<script th:src="@{/static/js/jquery-3.3.1.min.js}" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    var tmProfile = {
        doUpdate : function(){
            var wcm = window.confirm('是否修改？');
            if(!wcm){
                return;
            }
            if($("#new_password2").val()!=$("#new_password").val()){
                alert('密码不一致！');
                return;
            }
            $("#form_user_form").submit();
        }
    };
</script>
</body>
</html>
